﻿using System.Windows;
using System.Windows.Controls;

namespace VideoTools
{
    /// <summary>
    /// MargeM3U8Page.xaml 的交互逻辑
    /// </summary>
    public partial class DefaultPage : Page
    {
        

        public DefaultPage()
        {
            InitializeComponent();
            Loaded += DefaultPage_Loaded;
        }

        private void DefaultPage_Loaded(object sender, RoutedEventArgs e)
        {
            double xWidth = this.ActualWidth;
            double xHeight = this.ActualHeight;
            AppManager.Instance.PageWidth = xWidth;
            AppManager.Instance.PageHeight = xHeight;
            //System.Windows.MessageBox.Show($"宽 {xWidth},高 {xHeight}");
            string defaultPage = AppConfig.Instance.DefaultPage;
            if (defaultPage != null && defaultPage.Length > 0)
            {
                MainWindow.Instance.MainFrame.Navigate(new Uri(defaultPage, UriKind.RelativeOrAbsolute));
            }
        }


    }
}
